package thread;

class CurrentThreadDemo {
    public static void main(String[] args) {
        Thread thread=Thread.currentThread();
        System.out.println("主线程:"+thread);
        doSome();
    }
    public static void doSome(){
        Thread t = Thread.currentThread();//获取执行dosome方法的线程
        System.out.println(t);
    }


}
